<%- include header.ejs %>
<div style="background-color: #f1f1f1">
    <div style="padding-top: 25px;margin-left: 10%;margin-right: 10%;">

        <h3>用户注册</h3>
        <form onsubmit="" class="registerform form-horizontal" method="post" style="margin-left: 20%;font-size: 18px">
            <table width="100%" style="table-layout:fixed;">
                <tr>
                    <td class="need" style="width:10px;line-height: 35px">*</td>
                    <td style="width:100px;line-height: 30px">用户名：</td>
                    <td style="width:300px;"><input style="width: 280px" type="text" name="username" class="inputxt"  datatype="/^[a-zA-Z]\w{4,12}$/" errormsg="用户名必须字母开头，长度为5-13个字符！" /></td>
                    <td><div style="margin-top: 3px" class="Validform_checktip"></div></td>
                </tr>
                <tr>
                    <td class="need" style="width:10px;line-height: 35px">*</td>
                    <td style="width:100px;line-height: 30px">密码：</td>
                    <td style="width:205px;"><input style="width: 280px" type="password" name="password" class="inputxt"  datatype="s5-13" errormsg="密码为5-13的数字和字母组成" /></td>
                    <td><div style="margin-top: 3px" class="Validform_checktip"></div></td>
                </tr>
                <tr>
                    <td class="need" style="width:10px;line-height: 35px">*</td>
                    <td style="width:100px;line-height: 30px">确认密码：</td>
                    <td style="width:205px;"><input style="width: 280px" type="password"  class="inputxt"  datatype="*" nullmsg="请再次输入密码" errormsg="您两次输入的密码不一致" recheck="password"/></td>
                    <td><div style="margin-top: 3px" class="Validform_checktip"></div></td>
                </tr>
                <tr>
                    <td class="need" style="width:10px;line-height: 35px">*</td>
                    <td style="width:100px;line-height: 30px">单位：</td>
                    <td style="width:205px;">
                        <select style="width: 285px;height: 33px" name="departmentId" datatype="*">
                            <option value="<%= one[0].Department_ID%>"><%=one[0]. Department_Name%></option>
                            <% two.forEach(function(data){%>
                            <option value="<%= data.Department_ID%>">|-<%= data.Department_Name%></option>
                                <% data.level_three.forEach(function(three){%>
                            <option value="<%= three.Department_ID%>">|---<%= three.Department_Name%></option>
                                <%})%>
                            <%})%>
                        </select>
                    </td>
                    <td><div style="margin-top: 3px" class="Validform_checktip"></div></td>
                </tr>
                <tr>
                    <td class="need" style="width:10px;line-height: 35px">*</td>
                    <td style="width:100px;line-height: 30px">工号：</td>
                    <td style="width:205px;"><input style="width: 280px" type="text" name="jobNumber" class="inputxt"  datatype="n4-30" errormsg="工号为4位数以上的数字！！" /></td>
                    <td><div style="margin-top: 3px" class="Validform_checktip"></div></td>
                </tr>
                <tr>
                    <td class="need" style="width:10px;line-height: 35px">*</td>
                    <td style="width:100px;line-height: 30px">姓名：</td>
                    <td style="width:205px;"><input style="width: 280px" type="text" name="personName" class="inputxt"  datatype="*2-15" errormsg="姓名为2-15位任意字符！" /></td>
                    <td><div style="margin-top: 3px" class="Validform_checktip"></div></td>
                </tr>
                <tr>
                    <td class="need" style="width:10px;line-height: 35px">*</td>
                    <td style="width:100px;line-height: 30px">身份证：</td>
                    <td style="width:205px;"><input style="width: 280px" type="text" name="idCard" class="inputxt"  datatype="/^[1-9]{1}[0-9]{14}$|^[1-9]{1}[0-9]{16}([0-9]|[xX])$/" errormsg="请输入正确的号码！！！" /></td>
                    <td><div style="margin-top: 3px" class="Validform_checktip"></div></td>
                </tr>

            </table>
            <input style="float: right;margin-right: 60%;margin-top: 30px" class="btn btn-primary" type="submit" value="注册">

        </form>
    </div>
</div>

<%- include footer.ejs %>
<script type="text/javascript">
    $(function(){
        //$(".registerform").Validform();  //就这一行代码！;

        $(function(){
            //$(".registerform").Validform();  //就这一行代码！;

            $(".registerform").Validform({
                tiptype:2
            })


        })
    })
</script>